﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DDDSample.Domain.Model.Cargos
{
	public interface ICargoRepository
	{
		/// <summary>
		/// Finds a cargo using given id.
		/// </summary>
		/// <param name="trackingId">Id</param>
		/// <returns>Cargo if found, else null</returns>
		Cargo Find(TrackingId trackingId);

		/// <summary>
		/// Finds all cargo.
		/// </summary>
		/// <returns>All cargo</returns>
		IList<Cargo> FindAll();

		/// <summary>
		/// Saves given cargo.
		/// </summary>
		/// <param name="cargo">cargo to save</param>
		void Save(Cargo cargo);

		/// <summary>
		/// 
		/// </summary>
		/// <returns>A new generated tracking Id.</returns>
		TrackingId NextTrackingId();
	}
}
